import Vue from 'vue';
import VueRouter, { RouteConfig } from 'vue-router';
import Main from '@/views/Main.vue';

Vue.use(VueRouter);

const routes: Array<RouteConfig> = [
  {
    path: '/',
    redirect: '/main' // 添加根路径重定向规则
  },
  {
  path:'/main',
  name:'Main',
  component:Main
}];

const router = new VueRouter({
  mode: 'history',
    routes
});

export default router;